package com.zerous.staria;
import com.zerous.framework.*;
import com.zerous.framework.ui.*;
import java.util.*;
import com.google.gson.*;
import com.zerous.staria.ui.*;

public class LayoutScreen extends Screen
{
	private Map<String, UIBase> gui;
	Layout l;
	//final String uiKinds[] = {"Button", "Rect", "CheckBox"};
	public LayoutScreen(Game ga, Screen pa)
	{
		super(ga, pa);
		gui = new HashMap<String, UIBase>();
	}
	
	public void bindLayout(String name)
	{
		Gson g = new GsonBuilder().create();
		l = g.fromJson(name, Layout.class).create(this, game);
	}

	@Override
	public void update()
	{
		l.update();
	}

	@Override
	public void render()
	{
		// TODO: Implement this method
	}

	public void drawWigets()
	{
		
		
		l.draw();
	}
	
	protected UIBase getUI(String name)
	{
		return l.getUI(name);
	}
}
